<?php

//UMA new
namespace App\Http\Resources;

use Illuminate\Http\Resources\Json\JsonResource;

class ContactInfo extends JsonResource
{
    /**
     * Transform the resource into an array.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return array
     */
    public function toArray($request)
    {
        $datas =  parent::toArray($request);
        $datas['first_contact_date'] = $this->first_contact_date['date'];
        $datas['first_contact_time'] = $this->first_contact_date['time'];
        $datas['second_contact_date'] = $this->second_contact_date['date'];
        $datas['second_contact_time'] = $this->second_contact_date['time'];
        return $datas;
    }
}
